import flask
app= flask.Flask(__name__)
"""
if on linux with curl:
curl http://localhost:5000
curl http://localhost:5000/test500
curl http://localhost:5000/test404


if powershell:
Invoke-WebRequest http://localhost:5000
Invoke-WebRequest http://localhost:5000/test500
Invoke-WebRequest http://localhost:5000/test404
"""
@app.route('/')
def index():
    html_content = """
    <html>
    <body>
    <h1>Hello World!</h1>
    </body>
    </html>
    """
    return html_content

@app.route('/test500')
def test500():
    raise Exception("This is a test exception for 500 error.")

@app.route('/test404')
def test404():
    return flask.abort(404)

if __name__ == '__main__':
    app.run(debug=True, host='0.0.0.0', port=5000)
